package com.xuecheng.content.test;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName CustomEventListener
 * @Description TODO
 * @Date 2023/7/16 21:08
 * @Version 1.0
 */
@Component
public class CustomEventListener implements ApplicationListener<CustomEvent> {
    @Override
    public void onApplicationEvent(CustomEvent customEvent) {
        String message = customEvent.getMessage();
        System.out.println("接收到的信息为: " + message);
    }
}